<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/include/include.jsp"%>
<div class="panelBar">
	<ul class="toolBar">
		<shiro:hasPermission name="log:editconfig">
		<li>
			<a class="edit" title="<fmt:message key="page.system.log.editconfigfile"/>" target="navTab" href="<c:url value="/system/log/config"/>">
				<span><fmt:message key="page.system.log.editconfigfile"/></span>
			</a>
		</li>
		</shiro:hasPermission>
		<shiro:hasPermission name="log:console">
		<li>
			<a class="icon" title="<fmt:message key="page.system.log.console"/>" target="navTab" href="<c:url value="/system/log/console"/>">
				<span><fmt:message key="page.system.log.console"/></span>
			</a>
		</li>
		</shiro:hasPermission>
	</ul>	
</div>
<div class="pageContent">
	<table class="list" width="100%" layoutH="123">
		<thead>
			<tr>
				<th width="25%"><fmt:message key="page.system.log.filename"/></th>
				<th width="25%"><fmt:message key="page.system.log.filesize"/></th>
				<th width="25%"><fmt:message key="page.system.log.lastmodifiedtime"/></th>	
				<th width="25%"><fmt:message key="page.system.log.operate"/></th>					
			</tr>
		</thead>
		<tbody>
			<c:if test="${not empty logFiles}">
				<c:forEach items="${logFiles}" var="logFile">
					<tr>
						<td>${logFile.fileName}</td>
						<td>${logFile.fileSize}</td>
						<td>
							<fmt:formatDate value="${logFile.lastModified}" pattern="yyyy-MM-dd HH:mm:ss"/>
						</td>
						<td>
							<a 
							<shiro:hasPermission name="log:download">class="button" href="<c:url value="/system/log/download/${logFile.fileName}/"/>"</shiro:hasPermission> 
							<shiro:lacksPermission name="log:download">class="buttonDisabled" href="javascript:;"</shiro:lacksPermission>>
								<span><fmt:message key="page.system.log.download"/></span>
							</a>
						</td>
					</tr>
				</c:forEach>
			</c:if>
		</tbody>
	</table>
</div>